// call
Function.prototype.myCall = function (context = window, ...args) {
    if (Function.prototype === this) {
        return '不可以是自己'
    }
    const x =  Symbol()
    context[x] = this;
    let res = context[x](args)
    delete context[x];
    return res;
}

// apply
Function.prototype.myApply = function (context = window, args) {
    if (Function.prototype === this) {
        return '不可以是自己'
    }
    const x =  Symbol()
    context[x] = this;
    let res;
    if (Array.isArray(args)) {
        res = context[x](args)
    } else {
        res = context[x]()
    }

    delete context[x];
    return res;
}

// bind
Function.prototype.myBind = function (context = window, ...args) {
    return function () {
        const x =  Symbol()
        context[x] = this;
        let res = context[x](args)
        delete context[x];
        return res
    };
}

console.log( Symbol())